<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_变量与常量</title>
</head>
<body>
<script>
  //js是一门弱类型的语言
  var a = 1
  console.log(a)
  var b = 3.14
  console.log(b)
  var c = "hello"
  console.log(c)
  var d = true
  console.log(d)
  a = 'you again'
  console.log(a)

  //JS ECMAScript ES6
  //使用let关键字声明变量
  let x = 1
  console.log(x)
  x=2
  console.log(x)
  // let x =3
  // console.log(x)
  //let声明的变量不可以重复声明

  //使用const关键字声明变量
  const y = 1
  console.log(y)
  //常量的值不允许修改
</script>
</body>
</html>